module DataTime

    integer :: TimerCRCC_calcChars=0

    real(8) :: TimeEpsilon = 1d-12 ! important: TimeEpsilon < TimeStepMin
    real(8) :: TimeStepDiff = 1d-8
    real(8) :: TimeStepMin = 1d-9
    real(8) :: TimeStepMax = 1d+10 ! maximal time step
    integer :: nTimeStepDiff, nDtGlobal
    integer :: nStepInitial = 0 ! initial number of Time Step, != 1 after Restart

    integer :: nStepGlobal = 0
    integer :: nStepLocal = 0
    integer :: nStepCells = 0 ! counter for all cell time steps

    real(8) :: TimeGlobal, dtGlobal
    real(8) :: TimeLocal, NextTimeLocal
    integer :: nNextTimeLocal

    real(8),allocatable :: TimeCell(:), NextTimeCell(:), CurrentTimeCell(:)
    real(8),allocatable :: dtCell(:)
    real(8),allocatable :: dt2Cell(:)
    real(8),allocatable :: dtFaceCorr(:,:) ! (2,nFaces)
    integer,allocatable :: dnTimeCell(:)
    integer,allocatable :: nNextTimeCell(:)
    logical,allocatable :: nNextTimeCell1(:)
        
    real(8),allocatable :: dtFace(:) ! nFaces
    
    logical :: AsynchronousTime = .false. !  .true. !
    logical :: AdaptiveMeshRefinement = .false. ! .true. !
    
! former
    real(8) :: ttime ! Current Time
    real(8) :: dt ! time step
    integer :: nstep ! number of Time Step
    real(8) :: dtOut
    real(8) :: dt2

!    real(8) :: TimeStepMin ! minimal time step

	character *10 eta ! Ccurrent PU time, for output
	real(8) :: CurrentTimeCPU ! current CPU time
	
	real(8) :: deltaTime1 = 0d0, deltaTime2 = 0d0

    real(8) :: Balans0(5),Balans1(5)


    real :: CPU_Start_Time, CPU_Finish_Time, CPU_Start_Steps_Time, cpu_dtime, cpu_2

end module DataTime
